import java.util.Scanner;
public class Test1 {
    public static int fac(int n){
        if(n==1){
            return 1;
        }return n*fac(n-1);
    }
    public static void main(String[] args) {
        Scanner sca=new Scanner(System.in);
        System.out.println("请输入一个数字");
        int a=sca.nextInt();
        int ret=fac(a);
        System.out.println(a+"的阶乘ret="+ret);

    }
}
